package com.example.testcomposeproject.pages.testEt

import com.ioidea.base.ui.mvvm.IUiEvent
import com.ioidea.base.ui.mvvm.loading.BaseUIState
import com.ioidea.base.ui.mvvm.loading.LoadingMsg

/**
 * @author: hemin
 * @date: 2024/9/9
 * @Desc:
 */
class TestEtContract {


    sealed class Event :IUiEvent{
        data object DevTest : Event()
        data object ShowLoadingDialog : Event()
        data object HideLoadingDialog : Event()
    }

    data class State(
        val isShowDialog: LoadingMsg = LoadingMsg(),
        val lamppostTypeName:String="",

        val lamppostNo:String="",
        val lamppostAlreadyExist:Boolean=false
    ) : BaseUIState {
        override fun getLoadingMsg(): LoadingMsg {
            return isShowDialog
        }

        override fun copyWithLoadingMsg(loadingMsg: LoadingMsg): State {
            return this.copy(isShowDialog = loadingMsg)
        }
    }

}